#ifndef __ming_fyp_render_XMesh_h__
#define __ming_fyp_render_XMesh_h__

//------------------------------------------------------------------------------
// header includes
#include "fyp/render/Renderable.h"

struct ID3DXMesh;

//------------------------------------------------------------------------------
namespace ming
{
namespace fyp
{
namespace render
{
	class TResourceFactory;

	//--------------------------------------------------------------------------
	class TXMesh : public IRenderable
	{
	public:
		//------------------------------
		// #cstor & #dstor
		TXMesh(const char *filename, TResourceFactory *resFactory);
		~TXMesh();
		
		//------------------------------
		// external operations
		virtual void Render();
		virtual const TAABox &GetAABox();
		
	private:
		//------------------------------
		// internal attributes
		ID3DXMesh *mXMesh;
		TResourceFactory *mResFactory;
		
		size_t mSubMeshCnt;
		TAABox mAABox;
		
		//------------------------------
		// internal operations
	};
	
	//--------------------------------------------------------------------------
}
}
}


#endif	//__ming_fyp_render_XMesh_h__